<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table border="1" width="70%" align="center">
    <tr height="10%">
        <th>主贴标题</th>
        <td>${HOME_POST_INFO.homePostTitle}</td>
    </tr>
    <tr height="10%">
        <th>心情说说</th>
        <td>${HOME_POST_INFO.sayMood}</td>
    </tr>
    <tr>
        <td>用户</td>
        <td>主贴内容</td>
    </tr>
    <tr>
        <td>${HOME_POST_INFO.userId}</td>
        <td>${HOME_POST_INFO.homePostContexts}</td>
    </tr>
    <tr>
        <td>用户</td>
        <td>回贴内容</td>
    </tr>
    <c:forEach var="ri" items="${REPLAY_LIST}">
        <tr>
            <td>
                ${ri.userId}
                <br/>
                ${ri.replyDate}
            </td>
            <td>${ri.replyPostContexts}</td>
        </tr>
    </c:forEach>
</table>
<form action="homeposts" method="post">
    <input type="hidden" name="userId" value="${USER_INFO.userId}">
    <input type="hidden" name="homeId" value="${HOME_POST_INFO.homePostId}">
    <input type="hidden" name="type" value="save2">
    <table border="1" width="70%" align="center">
        <tr>
            <th>内容</th>
            <td><textarea rows="30%" cols="100%" name="content"></textarea></td>
        </tr>
        <tr>
            <th colspan="2">
                <c:choose>
                    <c:when test="${empty USER_INFO}">
                        请登录后发表帖子
                    </c:when>
                    <c:otherwise>
                        <button>发表</button>
                    </c:otherwise>
                </c:choose>
            </th>
        </tr>
    </table>
</form>
</body>
</html>